package com.huilian.iotbox.admin.service;

import com.alibaba.fastjson.JSONObject;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.MemberStoreBalanceDto;
import com.huilian.iotbox.data.po.MemberStoreBalance;
import com.huilian.iotbox.data.vo.MemberStoreBalanceVo;

/**
 * @author 谢洛涛
 * @date 2021/3/31 13:14
 */
public interface MemberStoreBalanceService {

    ServerResponse consumeMember(MemberStoreBalance memberStoreBalance);

    Integer findDayMemberNewNumByStoreId(MemberStoreBalanceDto memberStoreBalanceDto);

    MemberStoreBalanceVo findBalance(MemberStoreBalanceDto memberStoreBalanceDto);

    Integer updateMemberStoreBalance(MemberStoreBalance memberStoreBalance);

    void insert(MemberStoreBalance memberStoreBalance);

    MemberStoreBalance addOrReduceMemberStoreBalanceBeforeCheckParam(int rechargeNum, int donateNum, long memberStoreBalanceId, long memberId, int userId, int merchantStoreId);

    int addMemberStoreBalance(int runCount, int rechargeNum, int donateNum, long memberStoreBalanceId, long memberId, int userId, int merchantStoreId);

    int reduceMemberStoreBalance(int runCount, int rechargeNum, int donateNum, Long memberStoreBalanceId, Long memberId, Integer userId, Integer merchantStoreId);


    int addMemberStoreChargeBalance(int i, MemberStoreBalance memberStoreBalance);

    MemberStoreBalance addOrReduceMemberStoreChargeBalanceBeforeCheckParam(MemberStoreBalance memberStoreBalance);

    Integer findDayMemberOldNumByStoreId(MemberStoreBalanceDto memberStoreBalanceDto);
}
